Locks the form and displays a status message.

<div class="definition">
    lock(message, [showSpinner])
</div>

<div class="arguments">
    <table>
    <tr>
        <td>message</td>
        <td><b>string</b>, message</td>
    </tr>
    <tr>
        <td>showSpinner</td>
        <td><b>boolean</b>, <i>optional</i>, spinner indicator</td>
    </tr>
    </table>
</div>

Returns <i>undefined</i>.

<h4>Description</h4>

This method will lock the form by adding a semi-transparent div on top of its content. The user will not be able to interact with
the form or its content until the form is unlocked with <a href="w2form.unlock" class="method">.unlock()</a>. This method will call
<a href="w2utils.lock" class="method">w2utils.lock()</a> to perform the locking.
<div style="height: 10px"></div>

If you have following form:
<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    formURL  : '/server/path',
    fields: [
        { field: 'first_name', type: 'text', required: true },
        { field: 'last_name', type: 'text', required: true },
        { field: 'email', type: 'email' }
    ],
    actions: {
        "save": function (target, data) { this.validate(); },
        "reset": function (target, data) { this.clear(); }
    }
});
</textarea>


You have 3 options how you want to lock the content.
<div style="height: 10px"></div>

Lock with a message and a spinner:
<textarea class="javascript">
w2ui.form.lock('Loading...', true);
</textarea>

Lock w/o a message, but with a spinner:
<textarea class="javascript">
w2ui.form.lock('', true);
</textarea>

Lock w/o a message and w/o a spinner:
<textarea class="javascript">
w2ui.form.lock('');
</textarea>